package fr.univ.context.data.entity;

import android.content.ContentValues;
import fr.univ.context.data.handler.EntityBase;
import fr.univ.context.data.table.NetworkTable;

/**
 * @Entity
 * @Table (name = "network")*/

public class Network extends EntityBase {
	
	/**
	 * @Column (name = "type")
	 * 'Wifi', 'Mobile' or 'No Network' */
	private String type;
	
	/**
	 * @Column (name = "ssid") 
	 * Name of a wireless local area network */
	private String ssid;
	
	
	public Network(String type, String ssid, String completeDate){
		super(completeDate);
		this.type = type;
		this.ssid = ssid;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSsid() {
		return ssid;
	}

	public void setSsid(String ssid) {
		this.ssid = ssid;
	}

	@Override
	/**
	 * Get ContentValues
	 * @return Object ContentValues with the values of this entity.*/
	public ContentValues getContentValues() {
		
		ContentValues cv = new ContentValues();
		
		cv.put(NetworkTable.COLUMNS[1], getType());
		cv.put(NetworkTable.COLUMNS[2], getSsid());
		cv.put(NetworkTable.COLUMNS[3], getCompleteDate());
		
		return cv;
	}
}
